import { RouteRecordRaw } from 'vue-router';
import Layout from '@/layout/index.vue';

export const constantRoutes = <RouteRecordRaw[]>[
    {
        path: '/redirect',
        component: Layout,
        children: [
            {
                path: '/redirect/:path(.*)',
                component: () => import('@/pages/redirect/index.vue'),
            },
        ],
        meta: {
            hidden: true,
        },
    },
    {
        path: '/',
        name: 'Root',
        component: Layout,
        redirect: { name: 'Homes' },
        children: [
            {
                path: 'homes',
                name: 'Homes',
                component: () => import('@/pages/HomesPage.vue'),
                meta: {
                    title: '首页',
                    subtitle: 'Homes',
                },
            },
            
            // {
            //     path: 'cooperate',
            //     name: 'Cooperate',
            //     component: () => import('@/pages/cooperate/index.vue'),
            //     meta: {
            //         title: '加盟合作',
            //         subtitle: 'Cooperate',
            //     },
            // },
            
            {
    path: 'serviceVideo',
    name: 'ServiceVideo',
    component: () => import('@/pages/services/ServiceVideo.vue'),
    meta: {
      title: '使用教学',
      subtitle: 'Service Video',
      hidden:false
    },
    props: true // 使路由组件能够接收到通过路由传递的 props
  },
  {
    path: 'servicePlans',
    name: 'ServicePlans',
    component: () => import('@/pages/services/ServicePlans.vue'),
    meta: {
      title: '加盟方案',
      subtitle: 'Service Plans',
    },
    props: true // 使路由组件能够接收到通过路由传递的 props
  },
  {
    path: 'materials',
    name: 'Materials',
    component: () => import('@/pages/materials/index.vue'),
    meta: {
        title: '材料辅料',
        subtitle: 'Materials',
        hidden:false
    },
},

{
    path: 'about',
    name: 'About',
    component: () => import('@/pages/about/index.vue'),
    meta: {
        title: '关于领绣',
        subtitle: 'About',
    },
},
{
    path: 'services',
    name: 'Services',
    component: () => import('@/pages/services/index.vue'),
    meta: {
        title: '服务支持',
        subtitle: 'Services',
        hidden:false
    },
},
            
            // {
            //     path: 'detail',
            //     name: 'Detail',
            //     component: () =>
            //         import('@/pages/vehicles/modules/ProductDetail.vue'),
            //     meta: {
            //         title: '详情',
            //         hidden: true,
            //     },
            // },
            {
                path: 'details',
                name: 'Details',
                component: () =>
                    import('@/pages/vehicles/modules/Details.vue'),
                meta: {
                    title: '详情改',
                    hidden: true,
                },
            },
            {
                path: 'products',
                name: 'Products',
                component: () => import('@/pages/products/index.vue'),
                meta: {
                    title: '款式选择',
                    subtitle: 'Products',
                    hidden: true,
                },
            },
            {
                path: 'vehicles',
                name: 'Vehicles',
                component: () => import('@/pages/vehicles/index.vue'),
                meta: {
                    title: '车型选择',
                    subtitle: 'Vehicles',
                    hidden: true,
                },
            },
            {
                path: 'vehiclesL',
                name: 'VehiclesL',
                component: () => import('@/pages/vehiclesL/index.vue'),
                meta: {
                    title: '车型选择',
                    subtitle: 'Vehicles',
                    hidden: true,
                },
            },
           
        ],
    },
    
    {
        path: '/sign-in',
        name: 'SignIn',
        component: () => import('@/pages/auth/SignInPage.vue'),
        meta: {
            title: '登录',
            hidden: true,
        },
    },
    {
        path: '/upload/:carId/:carName/:carCode',
        name: 'upload',
        component: () => import('@/pages/upto/index.vue'),
        meta: {
            title: '实拍上传',
            hidden: true,
        },
    },
    {
        path: '/virtual/:productId/:carId',
        name: 'virtual',
        component: () => import('@/pages/virtually/index.vue'),
        meta: {
            title: '虚拟上传',
            hidden: true,
        },
    },
    // Always leave this as last one,
    // but you can also remove it
    {
        path: '/:catchAll(.*)*',
        component: () => import('@/pages/error/NotFoundPage.vue'),
    },
];
